import request from '@/utils/request'

// 查询加盟信息列表
export function listLeague(query) {
  return request({
    url: '/system/league/list',
    method: 'get',
    params: query
  })
}

// 查询加盟信息详细
export function getLeague(leagueId) {
  return request({
    url: '/system/league/' + leagueId,
    method: 'get'
  })
}

// 新增加盟信息
export function addLeague(data) {
  return request({
    url: '/system/league',
    method: 'post',
    data: data
  })
}

// 修改加盟信息
export function updateLeague(data) {
  return request({
    url: '/system/league',
    method: 'put',
    data: data
  })
}

// 删除加盟信息
export function delLeague(leagueId) {
  return request({
    url: '/system/league/' + leagueId,
    method: 'delete'
  })
}

// 处理加盟信息
export function dealLeague(data) {
  return request({
    url: '/system/league/deal',
    method: 'post',
    data: data
  })
}

// 导出加盟信息
export function exportLeague(query) {
  return request({
    url: '/system/league/export',
    method: 'get',
    params: query
  })
}
